<template>
    <!-- 返回上一页 -->
    <div class="go-back">
        <header @click="goBack">
            <van-icon name="arrow-left" />
        </header>
    </div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
 
const $router = useRouter()

const goBack = () => {
    $router.go(-1)
}


</script>
<style lang="less" scoped>
@import '../static/less/variable.less';

.go-back {
    width: 100%;
    margin-bottom: 10px;

    header {
        width: 100%;
        height: 60px;
        line-height: 60px;
        background-color: @bgColor;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;

        i {
            font-size: 30px;
            display: inline-block;
            vertical-align: middle;
        }
    }

}
</style>